import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl"

const TCHYURL = BASEURL.TCHYURL
const loginApi = {
    /**登录 */
    loginuser(params) {
        let url = TCHYURL + '/auth/login'
        return myaxios.post(url, params)
    },

    // 获取用户个人信息
    getUserInfo(params) {
        let url = TCHYURL + '/system/user/getUserInfo'
        return myaxios.get(url, params)
    },
    getAuditCode(params) {
        let url = TCHYURL + '/auth/sms/send_login_sms'
        return myaxios.post(url, params)
    },
    //代办数量
    indexNumber(params) {
        let url = TCHYURL + '/account/index/indexNumber'
        return myaxios.post(url, params)
    },

    // 消息通知
    getMessageNotice(params) {
        let url = TCHYURL + '/account/index/messageNotice'
        return myaxios.post(url, params)
    },
    //消息中心 消息列表
    getMessageNoticeAll(params) {
        let url = TCHYURL + '/account/index/messageNoticeAll'
        return myaxios.post(url, params)
    },
    //点击消息  未读变已读
    messageReading(params) {
        let url = TCHYURL + '/account/message/modifyMessageRead'
        return myaxios.post(url, params)
    },
    AllMessageReading(params) {
        let url = TCHYURL + '/account/message/modifyMessageReadAll'
        return myaxios.post(url, params)
    },

    //权限路由
    getRouters(params) {
        let url = TCHYURL + '/system/menu/getRouters'
        return myaxios.get(url, params)
    },
    getRoutersbutton(params) {
        let url = TCHYURL + '/system/menu/button'
        return myaxios.get(url, params)
    },

    //概况权限
    getOverviewAuthority(params) {
        let url = TCHYURL + '/system/menu/getIndexPerms'
        return myaxios.get(url, params)
    },

    //个人设置修改
    personalSettingsUpdate(params) {
        let url = TCHYURL + '/system/user/updateByUserInfo'
        return myaxios.post(url, params)
    },
    //清理tkoen
    refreshToken(params) {
        let url = TCHYURL + '/system/user/refreshToken'
        return myaxios.post(url, params)
    },
     //获取code
     getCaptcha(params) {
        let url = TCHYURL + '/auth/getCaptcha'
        return myaxios.post(url, params)
    }
}
export default loginApi;